package com.e1xp.deport_management_system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.e1xp.deport_management_system.entity.User;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author E1xP
 * @since 2021-04-09
 */
public interface UserMapper extends BaseMapper<User> {

    @Select("SELECT id,username,type from user where instance_id=#{instanceId}")
    List<User> getList(long instanceId);

    @Select("SELECT MAX(instance_id) from user")
    long getMaxInstanceId();
}
